#include<iostream>
#include<string>
#include<string.h>
#include<stdio.h>

using namespace std;
void test1()
{
    string s;
    getline(cin, s);
    int i = 0;
    s.insert(0, "x");

}
void test2()
{
    string lv("hello word");
    cout << lv << endl;
    reverse(lv.begin(), lv.end());
    cout << lv << endl;
 }
void test3()
{
    string s("hello word word word word word");
    cout << s << endl;
    int i = 0;
    int pos;
    pos = s.find(' ');
    int end = s.size();
    while (i < end + 1)
    {
         reverse(s.begin() + i, s.begin() + pos-1 );
        i = pos + 1;
        pos = s.find(i, ' ');
        if (pos == string::npos)
        {
            pos = s.size();
        }
    }
    cout << s << endl;
}

void test4()
{
    string s("hello word");
    int i = s.find(' ');
    cout << s << endl;
    int pos = s.find(' ');
    reverse(s.begin(),s.begin()+2);
    cout << s <<endl;

}
void test5()
{
    string s("hello word");
    cout << s << endl;
    reverse(s.begin(),s.begin()+1);
    cout << s << endl;
    

    cout << "shucu" << endl;
    cout << s << endl;

}
void test6()
{
    string s = ("hello word");
    cout << s << endl;
    int pos = s.find(' ');
    cout << pos<<endl;
    reverse(s.begin(),s.begin()+5);
    cout << s << endl;
}
void test7()
{
    string s = ("hello word");
    //cout << s << endl;
    //int pos = s.find(' ');
    //cout << pos << endl;
    //reverse(s.begin(), s.begin() + 5);
    //cout << s << endl;

    /*char s2[100] = { "hello word" };
    reverse(s2,s2+1);
    printf("%p,%p\n",s2[0],s2[1]);
    char* s =s2;*/

    
   
   
}


int main()
{
    test7();
    return 0;
}
